package com.terren.spider.db.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.terren.spider.db.basic.BasicServiceSupportImpl;
import com.terren.spider.db.service.SpiderTaskService;
import com.terren.spider.entity.core.SpiderTask;
@Service("spiderTaskService")
public class SpiderTaskServiceImpl extends BasicServiceSupportImpl implements SpiderTaskService{
	private final String SQL_MAPPER = "spiderTaskMapper.";

	@Override
	public List<SpiderTask> getSpiderTaskList() throws Exception {
		return basicDao.findForList(SQL_MAPPER+"getSpiderTaskList", null);
	}

	@Override
	public void updateStatus(SpiderTask spiderTask) throws Exception {
		basicDao.save(SQL_MAPPER+"updateStatus", spiderTask);
		
	}

	@Override
	public SpiderTask getOneSpiderTask() throws Exception {
		// TODO Auto-generated method stub
		return basicDao.findForObject(SQL_MAPPER+"getOneSpiderTask", null);
	}

	@Override
	public SpiderTask getOneSpiderPageTask() throws Exception {
		// TODO Auto-generated method stub
		return basicDao.findForObject(SQL_MAPPER+"getOneSpiderPageTask", null);
	}

}
